feat: Streams API (ILA streams and records)#2533
Closed
andersfylling wants to merge 3 commits intomasterfrom
Closed
feat: Streams API (ILA streams and records)#2533andersfylling wants to merge 3 commits intomasterfrom
andersfylling wants to merge 3 commits intomasterfrom
Conversation
Expose CogniteClient.streams with create/list/retrieve/delete, record ingest/upsert/delete/filter/aggregate/sync, and deprecated single-stream delete. Query params use string true/false for includeStatistics per API. Made-with: Cursor
- Replace single-file StreamsAPI with cognite.client._api.streams package and
nested StreamsRecordsAPI for /streams/{id}/records/*.
- Add data_classes.streams (Stream, Record*, response types, lists with mixins).
- Register streams in non-retryable create/delete paths and explicit record
write paths; keep filter/aggregate/sync POSTs retryable.
- Extend CogniteClientMock and add unit tests for API and data classes.
- Document retry behavior in TestRetryableEndpoints.
Made-with: Cursor
Remove ingest_records/*_records delegators from StreamsAPI; use client.streams.records.* only. Remove delete_deprecated (unreleased API). Update unit test to assert records.ingest directly. Made-with: Cursor
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2533 +/- ##
==========================================
+ Coverage 91.35% 91.36% +0.01%
==========================================
Files 192 197 +5
Lines 26218 26477 +259
==========================================
+ Hits 23951 24192 +241
- Misses 2267 2285 +18
🚀 New features to boost your workflow:
|
Contributor
|
Are you coordinating with @evertoncolling and #2519 ? |
Contributor
I tried to speed things up here with #2519 (and the previous ones), but since my PRs had to wait until v8, @andersfylling will be picking it up from me and get the SDK support all the way. Feel free to close my PR if this one gets merged 🙂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
CogniteClient.streams(StreamsAPI) for ILA Streams and Records HTTP APIs under/streamsand/streams/{streamId}/records/....Changes
cognite/client/_api/streams.py:create,list,retrieve(withincludeStatisticsas lowercasetrue/falsequery strings),delete(POST/streams/delete),delete_deprecated(deprecated DELETE), and record helpersingest_records,upsert_records,delete_records,filter_records,aggregate_records,sync_records.StreamsAPIonCogniteClient.streamstoCogniteClientMockwithspec_set=StreamsAPI.Notes
Made with Cursor